package com.celesea.auth.core.util;

import com.celesea.auth.core.entity.BaseEntity;

import java.io.Serializable;
import java.util.HashMap;
import java.util.List;

/**
 * 
 * @author Administrator
 * 
 * @param <T>
 */
public class PageData<T extends BaseEntity> extends HashMap<String, Object> {
	/**
	 * 结果集
	 */
	private List<T> rows;
	/**
	 * 分页
	 */
	private Pager pager;
	/**
	 * 过滤条件
	 */
	private Filter filter;
	/**
	 * 排序方式
	 */
	private Sort sort;

	/**
	 * 
	 * @param key
	 * @param obj
	 */
	public void addResult(String key, Object obj) {
		super.put(key, obj);
	}

	public List<T> getRows() {
		return rows;
	}

	public void setRows(List<T> rows) {
		this.rows = rows;
	}

	public Pager getPager() {
		return pager;
	}

	public void setPager(Pager pager) {
		this.pager = pager;
	}

	public Filter getFilter() {
		return filter;
	}

	public void setFilter(Filter filter) {
		this.filter = filter;
	}

	public Sort getSort() {
		return sort;
	}

	public void setSort(Sort sort) {
		this.sort = sort;
	}
}
